package com.apes.framework.util.statistics;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

public interface StatisticsRepository extends ElasticsearchRepository<Statistics, String> {

    Page<Statistics> findByMethodAndCreatedOnBetweenOrderByEndTimeDesc(String method, String start, String end, Pageable pageable);

    List<Statistics> findByCreatedOnLessThan(String createdOn, Pageable pageable);
}